<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Module: ActionView::Helpers::TextHelper</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Module</strong></td>
          <td class="class-name-in-header">ActionView::Helpers::TextHelper</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/rails/actionpack/lib/action_view/helpers/text_helper_rb.html">
                vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb
                </a>
        <br />
            </td>
        </tr>

        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">

    <div id="description">
      <p>
The <a href="TextHelper.html">TextHelper</a> module provides a set of
methods for filtering, formatting and transforming strings, which can
reduce the amount of inline Ruby code in your views. These helper methods
extend ActionView making them callable within your template files.
</p>

    </div>


   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M001058">auto_link</a>&nbsp;&nbsp;
      <a href="#M001048">concat</a>&nbsp;&nbsp;
      <a href="#M001059">cycle</a>&nbsp;&nbsp;
      <a href="#M001051">excerpt</a>&nbsp;&nbsp;
      <a href="#M001050">highlight</a>&nbsp;&nbsp;
      <a href="#M001056">markdown</a>&nbsp;&nbsp;
      <a href="#M001052">pluralize</a>&nbsp;&nbsp;
      <a href="#M001060">reset_cycle</a>&nbsp;&nbsp;
      <a href="#M001057">simple_format</a>&nbsp;&nbsp;
      <a href="#M001054">textilize</a>&nbsp;&nbsp;
      <a href="#M001055">textilize_without_paragraph</a>&nbsp;&nbsp;
      <a href="#M001049">truncate</a>&nbsp;&nbsp;
      <a href="#M001053">word_wrap</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">AUTO_LINK_RE</td>
          <td>=</td>
          <td class="context-item-value">%r{                         (                          # leading text                           &lt;\w+.*?&gt;|                # leading HTML tag, or                           [^=!:'&quot;/]|               # leading punctuation, or                            ^                        # beginning of line                         )                         (                           (?:https?://)|           # protocol spec, or                           (?:www\.)                # www.*                         )                          (                           [-\w]+                   # subdomain or domain                           (?:\.[-\w]+)*            # remaining subdomains or domain                           (?::\d+)?                # port                           (?:/(?:(?:[~\w\+@%-]|(?:[,.;:][^\s$]))+)?)* # path                           (?:\?[\w\+@%&amp;=.;-]+)?     # query string                           (?:\#[\w\-]*)?           # trailing anchor                         )                         ([[:punct:]]|\s|&lt;|$)       # trailing text                        }x unless const_defined?(:AUTO_LINK_RE)</td>
        </tr>
        </table>
      </div>
    </div>



      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M001058" class="method-detail">
        <a name="M001058"></a>

        <div class="method-heading">
          <a href="#M001058" class="method-signature">
          <span class="method-name">auto_link</span><span class="method-args">(text, link = :all, href_options = {}, &amp;block)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Turns all URLs and e-mail addresses into clickable links. The <tt>link</tt>
parameter will limit what should be linked. You can add HTML attributes to
the links using <tt>href_options</tt>. Options for <tt>link</tt> are
<tt>:all</tt> (default), <tt>:email_addresses</tt>, and <tt>:urls</tt>. If
a block is given, each URL and e-mail address is yielded and the result is
used as the link text.
</p>
<h4>Examples</h4>
<pre>
  auto_link(&quot;Go to http://www.rubyonrails.org and say hello to david@loudthinking.com&quot;)
  # =&gt; &quot;Go to &lt;a href=\&quot;http://www.rubyonrails.org\&quot;&gt;http://www.rubyonrails.org&lt;/a&gt; and
  #     say hello to &lt;a href=\&quot;mailto:david@loudthinking.com\&quot;&gt;david@loudthinking.com&lt;/a&gt;&quot;

  auto_link(&quot;Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com&quot;, :urls)
  # =&gt; &quot;Visit &lt;a href=\&quot;http://www.loudthinking.com/\&quot;&gt;http://www.loudthinking.com/&lt;/a&gt;
  #     or e-mail david@loudthinking.com&quot;

  auto_link(&quot;Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com&quot;, :email_addresses)
  # =&gt; &quot;Visit http://www.loudthinking.com/ or e-mail &lt;a href=\&quot;mailto:david@loudthinking.com\&quot;&gt;david@loudthinking.com&lt;/a&gt;&quot;

  post_body = &quot;Welcome to my new blog at http://www.myblog.com/.  Please e-mail me at me@email.com.&quot;
  auto_link(post_body, :all, :target =&gt; '_blank') do |text|
    truncate(text, 15)
  end
  # =&gt; &quot;Welcome to my new blog at &lt;a href=\&quot;http://www.myblog.com/\&quot; target=\&quot;_blank\&quot;&gt;http://www.m...&lt;/a&gt;.
        Please e-mail me at &lt;a href=\&quot;mailto:me@email.com\&quot;&gt;me@email.com&lt;/a&gt;.&quot;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001058-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001058-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 307</span>
307:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">auto_link</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">link</span> = <span class="ruby-identifier">:all</span>, <span class="ruby-identifier">href_options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
308:         <span class="ruby-keyword kw">return</span> <span class="ruby-value str">''</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">blank?</span>
309:         <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">link</span>
310:           <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:all</span>             <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">auto_link_email_addresses</span>(<span class="ruby-identifier">auto_link_urls</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">href_options</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>), <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
311:           <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:email_addresses</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">auto_link_email_addresses</span>(<span class="ruby-identifier">text</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
312:           <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:urls</span>            <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">auto_link_urls</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">href_options</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
313:         <span class="ruby-keyword kw">end</span>
314:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001048" class="method-detail">
        <a name="M001048"></a>

        <div class="method-heading">
          <a href="#M001048" class="method-signature">
          <span class="method-name">concat</span><span class="method-args">(string, binding)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
The preferred method of outputting text in your views is to use the &lt;%=
&quot;text&quot; %&gt; eRuby syntax. The regular <em>puts</em> and
<em>print</em> methods do not operate as expected in an eRuby code block.
If you absolutely must output text within a non-output code block (i.e.,
&lt;% %&gt;), you can use the <a href="TextHelper.html#M001048">concat</a>
method.
</p>
<h4>Examples</h4>
<pre>
  &lt;%
      concat &quot;hello&quot;, binding
      # is the equivalent of &lt;%= &quot;hello&quot; %&gt;

      if (logged_in == true):
        concat &quot;Logged in!&quot;, binding
      else
        concat link_to('login', :action =&gt; login), binding
      end
      # will either display &quot;Logged in!&quot; or a login link
  %&gt;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001048-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001048-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 28</span>
28:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">concat</span>(<span class="ruby-identifier">string</span>, <span class="ruby-identifier">binding</span>)
29:         <span class="ruby-identifier">eval</span>(<span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Base</span>.<span class="ruby-identifier">erb_variable</span>, <span class="ruby-identifier">binding</span>) <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">string</span>
30:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001059" class="method-detail">
        <a name="M001059"></a>

        <div class="method-heading">
          <a href="#M001059" class="method-signature">
          <span class="method-name">cycle</span><span class="method-args">(first_value, *values)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Creates a Cycle object whose <em>to_s</em> method cycles through elements
of an array every time it is called. This can be used for example, to
alternate classes for table rows. You can use named cycles to allow nesting
in loops. Passing a Hash as the last parameter with a <tt>:name</tt> key
will create a named <a href="TextHelper.html#M001059">cycle</a>. You can
manually reset a <a href="TextHelper.html#M001059">cycle</a> by calling <a
href="TextHelper.html#M001060">reset_cycle</a> and passing the name of the
<a href="TextHelper.html#M001059">cycle</a>.
</p>
<h4>Examples</h4>
<pre>
  # Alternate CSS classes for even and odd numbers...
  @items = [1,2,3,4]
  &lt;table&gt;
  &lt;% @items.each do |item| %&gt;
    &lt;tr class=&quot;&lt;%= cycle(&quot;even&quot;, &quot;odd&quot;) -%&gt;&quot;&gt;
      &lt;td&gt;item&lt;/td&gt;
    &lt;/tr&gt;
  &lt;% end %&gt;
  &lt;/table&gt;

  # Cycle CSS classes for rows, and text colors for values within each row
  @items = x = [{:first =&gt; 'Robert', :middle =&gt; 'Daniel', :last =&gt; 'James'},
               {:first =&gt; 'Emily', :middle =&gt; 'Shannon', :maiden =&gt; 'Pike', :last =&gt; 'Hicks'},
              {:first =&gt; 'June', :middle =&gt; 'Dae', :last =&gt; 'Jones'}]
  &lt;% @items.each do |item| %&gt;
    &lt;tr class=&quot;&lt;%= cycle(&quot;even&quot;, &quot;odd&quot;, :name =&gt; &quot;row_class&quot;) -%&gt;&quot;&gt;
      &lt;td&gt;
        &lt;% item.values.each do |value| %&gt;
          &lt;%# Create a named cycle &quot;colors&quot; %&gt;
          &lt;span style=&quot;color:&lt;%= cycle(&quot;red&quot;, &quot;green&quot;, &quot;blue&quot;, :name =&gt; &quot;colors&quot;) -%&gt;&quot;&gt;
            &lt;%= value %&gt;
          &lt;/span&gt;
        &lt;% end %&gt;
        &lt;% reset_cycle(&quot;colors&quot;) %&gt;
      &lt;/td&gt;
   &lt;/tr&gt;
 &lt;% end %&gt;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001059-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001059-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 352</span>
352:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">cycle</span>(<span class="ruby-identifier">first_value</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">values</span>)
353:         <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">values</span>.<span class="ruby-identifier">last</span>.<span class="ruby-identifier">instance_of?</span> <span class="ruby-constant">Hash</span>)
354:           <span class="ruby-identifier">params</span> = <span class="ruby-identifier">values</span>.<span class="ruby-identifier">pop</span>
355:           <span class="ruby-identifier">name</span> = <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:name</span>]
356:         <span class="ruby-keyword kw">else</span>
357:           <span class="ruby-identifier">name</span> = <span class="ruby-value str">&quot;default&quot;</span>
358:         <span class="ruby-keyword kw">end</span>
359:         <span class="ruby-identifier">values</span>.<span class="ruby-identifier">unshift</span>(<span class="ruby-identifier">first_value</span>)
360: 
361:         <span class="ruby-identifier">cycle</span> = <span class="ruby-identifier">get_cycle</span>(<span class="ruby-identifier">name</span>)
362:         <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">cycle</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">cycle</span>.<span class="ruby-identifier">values</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">values</span>)
363:           <span class="ruby-identifier">cycle</span> = <span class="ruby-identifier">set_cycle</span>(<span class="ruby-identifier">name</span>, <span class="ruby-constant">Cycle</span>.<span class="ruby-identifier">new</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">values</span>))
364:         <span class="ruby-keyword kw">end</span>
365:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">cycle</span>.<span class="ruby-identifier">to_s</span>
366:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001051" class="method-detail">
        <a name="M001051"></a>

        <div class="method-heading">
          <a href="#M001051" class="method-signature">
          <span class="method-name">excerpt</span><span class="method-args">(text, phrase, radius = 100, excerpt_string = &quot;...&quot;)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Extracts an <a href="TextHelper.html#M001051">excerpt</a> from
<tt>text</tt> that matches the first instance of <tt>phrase</tt>. The
<tt>radius</tt> expands the <a href="TextHelper.html#M001051">excerpt</a>
on each side of the first occurrence of <tt>phrase</tt> by the number of
characters defined in <tt>radius</tt> (which defaults to 100). If the <a
href="TextHelper.html#M001051">excerpt</a> radius overflows the beginning
or end of the <tt>text</tt>, then the <tt>excerpt_string</tt> will be
prepended/appended accordingly. If the <tt>phrase</tt> isn&#8216;t found,
nil is returned.
</p>
<h4>Examples</h4>
<pre>
  excerpt('This is an example', 'an', 5)
  # =&gt; &quot;...s is an examp...&quot;

  excerpt('This is an example', 'is', 5)
  # =&gt; &quot;This is an...&quot;

  excerpt('This is an example', 'is')
  # =&gt; &quot;This is an example&quot;

  excerpt('This next thing is an example', 'ex', 2)
  # =&gt; &quot;...next t...&quot;

  excerpt('This is also an example', 'an', 8, '&lt;chop&gt; ')
  # =&gt; &quot;&lt;chop&gt; is also an example&quot;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001051-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001051-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 101</span>
101:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">excerpt</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">phrase</span>, <span class="ruby-identifier">radius</span> = <span class="ruby-value">100</span>, <span class="ruby-identifier">excerpt_string</span> = <span class="ruby-value str">&quot;...&quot;</span>)
102:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">phrase</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">end</span>
103:         <span class="ruby-identifier">phrase</span> = <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">phrase</span>)
104: 
105:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">found_pos</span> = <span class="ruby-identifier">text</span>.<span class="ruby-identifier">chars</span> <span class="ruby-operator">=~</span> <span class="ruby-node">/(#{phrase})/i</span>
106:           <span class="ruby-identifier">start_pos</span> = [ <span class="ruby-identifier">found_pos</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">radius</span>, <span class="ruby-value">0</span> ].<span class="ruby-identifier">max</span>
107:           <span class="ruby-identifier">end_pos</span>   = [ <span class="ruby-identifier">found_pos</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">phrase</span>.<span class="ruby-identifier">chars</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">radius</span>, <span class="ruby-identifier">text</span>.<span class="ruby-identifier">chars</span>.<span class="ruby-identifier">length</span> ].<span class="ruby-identifier">min</span>
108: 
109:           <span class="ruby-identifier">prefix</span>  = <span class="ruby-identifier">start_pos</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">excerpt_string</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;&quot;</span>
110:           <span class="ruby-identifier">postfix</span> = <span class="ruby-identifier">end_pos</span> <span class="ruby-operator">&lt;</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">chars</span>.<span class="ruby-identifier">length</span> <span class="ruby-value">? </span><span class="ruby-identifier">excerpt_string</span> <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;&quot;</span>
111: 
112:           <span class="ruby-identifier">prefix</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">chars</span>[<span class="ruby-identifier">start_pos</span><span class="ruby-operator">..</span><span class="ruby-identifier">end_pos</span>].<span class="ruby-identifier">strip</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">postfix</span>
113:         <span class="ruby-keyword kw">else</span>
114:           <span class="ruby-keyword kw">nil</span>
115:         <span class="ruby-keyword kw">end</span>
116:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001050" class="method-detail">
        <a name="M001050"></a>

        <div class="method-heading">
          <a href="#M001050" class="method-signature">
          <span class="method-name">highlight</span><span class="method-args">(text, phrases, highlighter = '&lt;strong class=&quot;highlight&quot;&gt;\1&lt;/strong&gt;')</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Highlights one or more <tt>phrases</tt> everywhere in <tt>text</tt> by
inserting it into a <tt>highlighter</tt> string. The highlighter can be
specialized by passing <tt>highlighter</tt> as a single-quoted string with
\1 where the phrase is to be inserted (defaults to &#8217;&lt;strong
class=&quot;<a
href="TextHelper.html#M001050">highlight</a>&quot;&gt;\1&lt;/strong&gt;&#8217;)
</p>
<h4>Examples</h4>
<pre>
  highlight('You searched for: rails', 'rails')
  # =&gt; You searched for: &lt;strong class=&quot;highlight&quot;&gt;rails&lt;/strong&gt;

  highlight('You searched for: ruby, rails, dhh', 'actionpack')
  # =&gt; You searched for: ruby, rails, dhh

  highlight('You searched for: rails', ['for', 'rails'], '&lt;em&gt;\1&lt;/em&gt;')
  # =&gt; You searched &lt;em&gt;for&lt;/em&gt;: &lt;em&gt;rails&lt;/em&gt;

  highlight('You searched for: rails', 'rails', &quot;&lt;a href='search?q=\1'&gt;\1&lt;/a&gt;&quot;)
  # =&gt; You searched for: &lt;a href='search?q=rails&gt;rails&lt;/a&gt;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001050-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001050-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 71</span>
71:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">highlight</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">phrases</span>, <span class="ruby-identifier">highlighter</span> = <span class="ruby-value str">'&lt;strong class=&quot;highlight&quot;&gt;\1&lt;/strong&gt;'</span>)
72:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">phrases</span>.<span class="ruby-identifier">blank?</span>
73:           <span class="ruby-identifier">text</span>
74:         <span class="ruby-keyword kw">else</span>
75:           <span class="ruby-identifier">match</span> = <span class="ruby-constant">Array</span>(<span class="ruby-identifier">phrases</span>).<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-constant">Regexp</span>.<span class="ruby-identifier">escape</span>(<span class="ruby-identifier">p</span>) }.<span class="ruby-identifier">join</span>(<span class="ruby-value str">'|'</span>)
76:           <span class="ruby-identifier">text</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/(#{match})/i</span>, <span class="ruby-identifier">highlighter</span>)
77:         <span class="ruby-keyword kw">end</span>
78:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001056" class="method-detail">
        <a name="M001056"></a>

        <div class="method-heading">
          <a href="#M001056" class="method-signature">
          <span class="method-name">markdown</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the text with all the Markdown codes turned into HTML tags.
<em>This method is only available if <a
href="http://www.deveiate.org/projects/BlueCloth">BlueCloth</a> is
available</em>.
</p>
<h4>Examples</h4>
<pre>
  markdown(&quot;We are using __Markdown__ now!&quot;)
  # =&gt; &quot;&lt;p&gt;We are using &lt;strong&gt;Markdown&lt;/strong&gt; now!&lt;/p&gt;&quot;

  markdown(&quot;We like to _write_ `code`, not just _read_ it!&quot;)
  # =&gt; &quot;&lt;p&gt;We like to &lt;em&gt;write&lt;/em&gt; &lt;code&gt;code&lt;/code&gt;, not just &lt;em&gt;read&lt;/em&gt; it!&lt;/p&gt;&quot;

  markdown(&quot;The [Markdown website](http://daringfireball.net/projects/markdown/) has more information.&quot;)
  # =&gt; &quot;&lt;p&gt;The &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown website&lt;/a&gt;
  #     has more information.&lt;/p&gt;&quot;

  markdown('![The ROR logo](http://rubyonrails.com/images/rails.png &quot;Ruby on Rails&quot;)')
  # =&gt; '&lt;p&gt;&lt;img src=&quot;http://rubyonrails.com/images/rails.png&quot; alt=&quot;The ROR logo&quot; title=&quot;Ruby on Rails&quot; /&gt;&lt;/p&gt;'
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001056-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001056-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 249</span>
249:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">markdown</span>(<span class="ruby-identifier">text</span>)
250:           <span class="ruby-identifier">text</span>.<span class="ruby-identifier">blank?</span> <span class="ruby-value">? </span><span class="ruby-value str">&quot;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-constant">BlueCloth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">text</span>).<span class="ruby-identifier">to_html</span>
251:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001052" class="method-detail">
        <a name="M001052"></a>

        <div class="method-heading">
          <a href="#M001052" class="method-signature">
          <span class="method-name">pluralize</span><span class="method-args">(count, singular, plural = nil)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Attempts to <a href="TextHelper.html#M001052">pluralize</a> the
<tt>singular</tt> word unless <tt>count</tt> is 1. If <tt>plural</tt> is
supplied, it will use that when count is &gt; 1, if the ActiveSupport <a
href="../../Inflector.html">Inflector</a> is loaded, it will use the <a
href="../../Inflector.html">Inflector</a> to determine the plural form,
otherwise it will just add an &#8216;s&#8217; to the <tt>singular</tt>
word.
</p>
<h4>Examples</h4>
<pre>
  pluralize(1, 'person')
  # =&gt; 1 person

  pluralize(2, 'person')
  # =&gt; 2 people

  pluralize(3, 'person', 'users')
  # =&gt; 3 users

  pluralize(0, 'person')
  # =&gt; 0 people
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001052-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001052-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 135</span>
135:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pluralize</span>(<span class="ruby-identifier">count</span>, <span class="ruby-identifier">singular</span>, <span class="ruby-identifier">plural</span> = <span class="ruby-keyword kw">nil</span>)
136:          <span class="ruby-node">&quot;#{count || 0} &quot;</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">count</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'1'</span>
137:           <span class="ruby-identifier">singular</span>
138:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">plural</span>
139:           <span class="ruby-identifier">plural</span>
140:         <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">Object</span>.<span class="ruby-identifier">const_defined?</span>(<span class="ruby-value str">&quot;Inflector&quot;</span>)
141:           <span class="ruby-constant">Inflector</span>.<span class="ruby-identifier">pluralize</span>(<span class="ruby-identifier">singular</span>)
142:         <span class="ruby-keyword kw">else</span>
143:           <span class="ruby-identifier">singular</span> <span class="ruby-operator">+</span> <span class="ruby-value str">&quot;s&quot;</span>
144:         <span class="ruby-keyword kw">end</span>
145:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001060" class="method-detail">
        <a name="M001060"></a>

        <div class="method-heading">
          <a href="#M001060" class="method-signature">
          <span class="method-name">reset_cycle</span><span class="method-args">(name = &quot;default&quot;)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Resets a <a href="TextHelper.html#M001059">cycle</a> so that it starts from
the first element the next time it is called. Pass in <tt>name</tt> to
reset a named <a href="TextHelper.html#M001059">cycle</a>.
</p>
<h4>Example</h4>
<pre>
  # Alternate CSS classes for even and odd numbers...
  @items = [[1,2,3,4], [5,6,3], [3,4,5,6,7,4]]
  &lt;table&gt;
  &lt;% @items.each do |item| %&gt;
    &lt;tr class=&quot;&lt;%= cycle(&quot;even&quot;, &quot;odd&quot;) -%&gt;&quot;&gt;
        &lt;% item.each do |value| %&gt;
          &lt;span style=&quot;color:&lt;%= cycle(&quot;#333&quot;, &quot;#666&quot;, &quot;#999&quot;, :name =&gt; &quot;colors&quot;) -%&gt;&quot;&gt;
            &lt;%= value %&gt;
          &lt;/span&gt;
        &lt;% end %&gt;

        &lt;% reset_cycle(&quot;colors&quot;) %&gt;
    &lt;/tr&gt;
  &lt;% end %&gt;
  &lt;/table&gt;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001060-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001060-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 387</span>
387:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">reset_cycle</span>(<span class="ruby-identifier">name</span> = <span class="ruby-value str">&quot;default&quot;</span>)
388:         <span class="ruby-identifier">cycle</span> = <span class="ruby-identifier">get_cycle</span>(<span class="ruby-identifier">name</span>)
389:         <span class="ruby-identifier">cycle</span>.<span class="ruby-identifier">reset</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">cycle</span>.<span class="ruby-identifier">nil?</span>
390:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001057" class="method-detail">
        <a name="M001057"></a>

        <div class="method-heading">
          <a href="#M001057" class="method-signature">
          <span class="method-name">simple_format</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns <tt>text</tt> transformed into HTML using simple formatting rules.
Two or more consecutive newlines(<tt>\n\n</tt>) are considered as a
paragraph and wrapped in <tt>&lt;p&gt;</tt> tags. One newline (<tt>\n</tt>)
is considered as a linebreak and a <tt>&lt;br /&gt;</tt> tag is appended.
This method does not remove the newlines from the <tt>text</tt>.
</p>
<h4>Examples</h4>
<pre>
  my_text = &quot;&quot;&quot;Here is some basic text...
            ...with a line break.&quot;&quot;&quot;

  simple_format(my_text)
  # =&gt; &quot;&lt;p&gt;Here is some basic text...&lt;br /&gt;...with a line break.&lt;/p&gt;&quot;

  more_text = &quot;&quot;&quot;We want to put a paragraph...

              ...right there.&quot;&quot;&quot;

  simple_format(more_text)
  # =&gt; &quot;&lt;p&gt;We want to put a paragraph...&lt;/p&gt;&lt;p&gt;...right there.&lt;/p&gt;&quot;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001057-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001057-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 275</span>
275:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">simple_format</span>(<span class="ruby-identifier">text</span>)
276:         <span class="ruby-identifier">content_tag</span> <span class="ruby-value str">'p'</span>, <span class="ruby-identifier">text</span>.<span class="ruby-identifier">to_s</span>.
277:           <span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\r\n?/</span>, <span class="ruby-value str">&quot;\n&quot;</span>).                    <span class="ruby-comment cmt"># \r\n and \r -&gt; \n</span>
278:           <span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\n\n+/</span>, <span class="ruby-value str">&quot;&lt;/p&gt;\n\n&lt;p&gt;&quot;</span>).           <span class="ruby-comment cmt"># 2+ newline  -&gt; paragraph</span>
279:           <span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/([^\n]\n)(?=[^\n])/</span>, <span class="ruby-value str">'\1&lt;br /&gt;'</span>)  <span class="ruby-comment cmt"># 1 newline   -&gt; br</span>
280:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001054" class="method-detail">
        <a name="M001054"></a>

        <div class="method-heading">
          <a href="#M001054" class="method-signature">
          <span class="method-name">textilize</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the text with all the <a
href="http://www.textism.com/tools/textile">Textile</a> codes turned into
HTML tags.
</p>
<p>
You can learn more about Textile&#8216;s syntax at its <a
href="http://www.textism.com/tools/textile">website</a>. <em>This method is
only available if <a
href="http://whytheluckystiff.net/ruby/redcloth/">RedCloth</a> is
available</em>.
</p>
<h4>Examples</h4>
<pre>
  textilize(&quot;*This is Textile!*  Rejoice!&quot;)
  # =&gt; &quot;&lt;p&gt;&lt;strong&gt;This is Textile!&lt;/strong&gt;  Rejoice!&lt;/p&gt;&quot;

  textilize(&quot;I _love_ ROR(Ruby on Rails)!&quot;)
  # =&gt; &quot;&lt;p&gt;I &lt;em&gt;love&lt;/em&gt; &lt;acronym title=&quot;Ruby on Rails&quot;&gt;ROR&lt;/acronym&gt;!&lt;/p&gt;&quot;

  textilize(&quot;h2. Textile makes markup -easy- simple!&quot;)
  # =&gt; &quot;&lt;h2&gt;Textile makes markup &lt;del&gt;easy&lt;/del&gt; simple!&lt;/h2&gt;&quot;

  textilize(&quot;Visit the Rails website &quot;here&quot;:http://www.rubyonrails.org/.)
  # =&gt; &quot;&lt;p&gt;Visit the Rails website &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&quot;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001054-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001054-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 190</span>
190:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">textilize</span>(<span class="ruby-identifier">text</span>)
191:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">blank?</span>
192:             <span class="ruby-value str">&quot;&quot;</span>
193:           <span class="ruby-keyword kw">else</span>
194:             <span class="ruby-identifier">textilized</span> = <span class="ruby-constant">RedCloth</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">text</span>, [ <span class="ruby-identifier">:hard_breaks</span> ])
195:             <span class="ruby-identifier">textilized</span>.<span class="ruby-identifier">hard_breaks</span> = <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">textilized</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-value str">&quot;hard_breaks=&quot;</span>)
196:             <span class="ruby-identifier">textilized</span>.<span class="ruby-identifier">to_html</span>
197:           <span class="ruby-keyword kw">end</span>
198:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001055" class="method-detail">
        <a name="M001055"></a>

        <div class="method-heading">
          <a href="#M001055" class="method-signature">
          <span class="method-name">textilize_without_paragraph</span><span class="method-args">(text)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Returns the text with all the Textile codes turned into HTML tags, but
without the bounding &lt;p&gt; tag that RedCloth adds.
</p>
<p>
You can learn more about Textile&#8216;s syntax at its <a
href="http://www.textism.com/tools/textile">website</a>. <em>This method is
only available if <a
href="http://whytheluckystiff.net/ruby/redcloth/">RedCloth</a> is
available</em>.
</p>
<h4>Examples</h4>
<pre>
  textilize_without_paragraph(&quot;*This is Textile!*  Rejoice!&quot;)
  # =&gt; &quot;&lt;strong&gt;This is Textile!&lt;/strong&gt;  Rejoice!&quot;

  textilize_without_paragraph(&quot;I _love_ ROR(Ruby on Rails)!&quot;)
  # =&gt; &quot;I &lt;em&gt;love&lt;/em&gt; &lt;acronym title=&quot;Ruby on Rails&quot;&gt;ROR&lt;/acronym&gt;!&quot;

  textilize_without_paragraph(&quot;h2. Textile makes markup -easy- simple!&quot;)
  # =&gt; &quot;&lt;h2&gt;Textile makes markup &lt;del&gt;easy&lt;/del&gt; simple!&lt;/h2&gt;&quot;

  textilize_without_paragraph(&quot;Visit the Rails website &quot;here&quot;:http://www.rubyonrails.org/.)
  # =&gt; &quot;Visit the Rails website &lt;a href=&quot;http://www.rubyonrails.org/&quot;&gt;here&lt;/a&gt;.&quot;
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001055-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001055-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 219</span>
219:         <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">textilize_without_paragraph</span>(<span class="ruby-identifier">text</span>)
220:           <span class="ruby-identifier">textiled</span> = <span class="ruby-identifier">textilize</span>(<span class="ruby-identifier">text</span>)
221:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">textiled</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">2</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&lt;p&gt;&quot;</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">textiled</span> = <span class="ruby-identifier">textiled</span>[<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-keyword kw">end</span>
222:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">textiled</span>[<span class="ruby-value">-4</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&lt;/p&gt;&quot;</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">textiled</span> = <span class="ruby-identifier">textiled</span>[<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-5</span>] <span class="ruby-keyword kw">end</span>
223:           <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">textiled</span>
224:         <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001049" class="method-detail">
        <a name="M001049"></a>

        <div class="method-heading">
          <a href="#M001049" class="method-signature">
          <span class="method-name">truncate</span><span class="method-args">(text, length = 30, truncate_string = &quot;...&quot;)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
If <tt>text</tt> is longer than <tt>length</tt>, <tt>text</tt> will be
truncated to the length of <tt>length</tt> (defaults to 30) and the last
characters will be replaced with the <tt>truncate_string</tt> (defaults to
&quot;&#8230;&quot;).
</p>
<h4>Examples</h4>
<pre>
  truncate(&quot;Once upon a time in a world far far away&quot;, 14)
  # =&gt; Once upon a...

  truncate(&quot;Once upon a time in a world far far away&quot;)
  # =&gt; Once upon a time in a world f...

  truncate(&quot;And they found that many people were sleeping better.&quot;, 25, &quot;(clipped)&quot;)
  # =&gt; And they found that many (clipped)

  truncate(&quot;And they found that many people were sleeping better.&quot;, 15, &quot;... (continued)&quot;)
  # =&gt; And they found... (continued)
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001049-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001049-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 48</span>
48:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">truncate</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">length</span> = <span class="ruby-value">30</span>, <span class="ruby-identifier">truncate_string</span> = <span class="ruby-value str">&quot;...&quot;</span>)
49:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">text</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">end</span>
50:         <span class="ruby-identifier">l</span> = <span class="ruby-identifier">length</span> <span class="ruby-operator">-</span> <span class="ruby-identifier">truncate_string</span>.<span class="ruby-identifier">chars</span>.<span class="ruby-identifier">length</span>
51:         (<span class="ruby-identifier">text</span>.<span class="ruby-identifier">chars</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">length</span> <span class="ruby-value">? </span><span class="ruby-identifier">text</span>.<span class="ruby-identifier">chars</span>[<span class="ruby-value">0</span><span class="ruby-operator">...</span><span class="ruby-identifier">l</span>] <span class="ruby-operator">+</span> <span class="ruby-identifier">truncate_string</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">text</span>).<span class="ruby-identifier">to_s</span>
52:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M001053" class="method-detail">
        <a name="M001053"></a>

        <div class="method-heading">
          <a href="#M001053" class="method-signature">
          <span class="method-name">word_wrap</span><span class="method-args">(text, line_width = 80)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p>
Wraps the <tt>text</tt> into lines no longer than <tt>line_width</tt>
width. This method breaks on the first whitespace character that does not
exceed <tt>line_width</tt> (which is 80 by default).
</p>
<h4>Examples</h4>
<pre>
  word_wrap('Once upon a time', 4)
  # =&gt; Once\nupon\na\ntime

  word_wrap('Once upon a time', 8)
  # =&gt; Once upon\na time

  word_wrap('Once upon a time')
  # =&gt; Once upon a time

  word_wrap('Once upon a time', 1)
  # =&gt; Once\nupon\na\ntime
</pre>
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M001053-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M001053-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb, line 163</span>
163:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">word_wrap</span>(<span class="ruby-identifier">text</span>, <span class="ruby-identifier">line_width</span> = <span class="ruby-value">80</span>)
164:         <span class="ruby-identifier">text</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>).<span class="ruby-identifier">collect</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">line</span><span class="ruby-operator">|</span>
165:           <span class="ruby-identifier">line</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">&gt;</span> <span class="ruby-identifier">line_width</span> <span class="ruby-value">? </span><span class="ruby-identifier">line</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-node">/(.{1,#{line_width}})(\s+|$)/</span>, <span class="ruby-value str">&quot;\\1\n&quot;</span>).<span class="ruby-identifier">strip</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">line</span>
166:         <span class="ruby-keyword kw">end</span> <span class="ruby-operator">*</span> <span class="ruby-value str">&quot;\n&quot;</span>
167:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>